<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>用户注册</title>
</head>
<body>
<h2>用户注册</h2>
<div th:if="${error}" style="color: red;" th:text="${error}"></div>
<form action="/register" method="post">
    用户名：<input type="text" name="username" required><br>
    密码：<input type="password" name="password" required><br>
    邮箱：<input type="email" name="email" required><br>
    <input type="submit" value="注册">
</form>
<p>已有账号？<a href="/login">立即登录</a></p>
</body>
</html> 